<?php
class c_food_type extends Controller {

	function c_food_type() {
		parent::Controller();	
	}

	function index() {
		$this->load->view('welcome_message');
	}

	function add() {
		$data = array(
			'to_do' => 'view food taste',
			'current_date' => date('r')
		);
		$this->m_xrvel_scaffolding_var->set_item('view_data', $data);
		$this->m_xrvel_scaffolding_var->set_item('view_template', 'template_sample');
		$this->m_xrvel_scaffolding->add('food_types');
	}

	function delete() {
		$data = array(
			'to_do' => 'view food taste',
			'current_date' => date('r')
		);
		$this->m_xrvel_scaffolding_var->set_item('view_data', $data);
		$this->m_xrvel_scaffolding_var->set_item('view_template', 'template_sample');
		$this->m_xrvel_scaffolding->delete('food_types', $this->uri->segment(3), '/'.$this->uri->segment(1).'/view/');
	}

	function edit() {
		$data = array(
			'to_do' => 'view food taste',
			'current_date' => date('r')
		);
		$this->m_xrvel_scaffolding_var->set_item('view_data', $data);
		$this->m_xrvel_scaffolding_var->set_item('view_template', 'template_sample');
		$this->m_xrvel_scaffolding->edit('food_types', $this->uri->segment(3));
	}

	function view() {
		$data = array(
			'to_do' => 'view food taste',
			'current_date' => date('r')
		);
		$this->m_xrvel_scaffolding_var->set_item('view_data', $data);
		$this->m_xrvel_scaffolding_var->set_item('view_template', 'template_sample');
		$this->m_xrvel_scaffolding->view('food_types');
	}
}
?>